{if strpos($row['group_name'] , 'tpl-') !== false}
<center><h1 style="color:red">礼品卡/现金券模板编辑器</h1></center>
{/if}
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-code" data-rule="required" class="form-control" name="row[code]" readonly="true"  type="text" value="{$row.code}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_name" data-rule="required" class="form-control" name="row[group_name]" type="text" value="{$row.group_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="{$row.description}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" type="number" value="{$row.amount}">
        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">最低使用金额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount_min]" type="number" value="{$row.amount_min}">
        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">最高使用金额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount_max]" type="number" value="{$row.amount_max}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">失效时间</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-date_end" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[date_end]" type="text" value="{$row.date_end}">
        </div>
    </div>
    <div class="form-group"  >
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_use')}:</label>
		<div class="col-xs-12 col-sm-8">
		<input id="c-is_use" data-rule="required" class="form-control" name="" readonly="true"  type="text" value="{$row.is_use}">
		</div>			

        
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">有效时间段:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-valid_date" data-rule="required"  class="form-control"
			 name="row[valid_date]" 
			type="text" value="{$row.valid_date}">
        </div>
    </div>
	
    <div class="form-group"  >
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_exchange')}:</label>	
		<div class="col-xs-12 col-sm-8">
			<input id="c-is_exchange" data-rule="required" class="form-control" name="row[is_exchange]" type="text" value="{$row.is_exchange}">   
        </div>
		
		
    </div>
	
	{if $row.is_exchange=='是'}
	 <div class="form-group"  >
        <label class="control-label col-xs-12 col-sm-2">兑换用户:</label>
        <div class="col-xs-12 col-sm-8">
		<input id="c-code"  class="form-control" name="row[email]"  type="text" value="{$row.email}">
		
		
		</div>	
    </div>
	{else}
	 <div class="form-group"  >
        <label class="control-label col-xs-12 col-sm-2">兑换用户:</label>
        <div class="col-xs-12 col-sm-8">
		<input id="c-code"  class="form-control" name="row[email]"  type="text" value="">
		
		
		</div>	
    </div>
	{/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
